<?php


namespace app\reimburse\validate;


use think\Validate;

class Project extends Validate
{
    protected $rule =   [
        'project_title'  => 'require|unique:project',
        'project_uuid'   => 'require',
        'category_id'   => 'require',
//        'principal'   => 'require',
//        'team'   => 'require',
        'type'   => 'require|in:0,1,2',
        'cause'   => 'require|max:500',
        'money'   => 'require|number',
        'start_time'   => 'require',
        'end_time'   => 'require',
//        'setting_type'   => 'require',
    ];

    protected $message  =   [
        'project_title.require' => '项目名必须',
        'project_title.unique' => '项目名已经存在',
        'project_uuid.require'     => '项目号必选',
        'category_id.require'   => '项目分类必选',
//        'principal.require'   => '项目负责人必选',
//        'team.require'   => '团队负责人必选',
        'type.require'   => '项目类型必选',
        'cause.require'   => '项目事由必传',
        'cause.max'   => '项目事由最多500字',
        'money.require'   => '项目金额必传',
        'start_time.require'   => '项目开始时间必传',
        'end_time.require'   => '项目结束时间必传',
        'setting_type.require'   => '报销类别必传',
    ];
}